﻿using BlockeyEssentials;
using BlockeyEssentials.Drawing;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Blockey.MenuSystemScreens
{
    public class MenuButton
    {
        public MenuButton(Rectangle oShape, Color oColor, int oLayer, Font oFont, string oMessage)
        {
            _Sprite = new SpriteR(All.Texture_Square, oShape);
            _Sprite.Color = oColor;
            _Sprite.Layer = oLayer;

            _Font = oFont;
            _Position = new Vector2(_Sprite.Rectangle.Left, _Sprite.Rectangle.Top);
            _Message = oMessage;
        }

        #region Methods

        public void Draw(SpriteBatch oSB, float oTransition)
        {
            _Sprite.Draw(oSB, oTransition);
            _Font.Draw(oSB, oTransition, _Position, _Message);
        }

        #endregion

        #region Properties

        public Rectangle Bounds
        {
            get { return _Sprite.Rectangle; }
            set { _Sprite.Rectangle = value; }
        }

        #endregion

        private SpriteR _Sprite;
        private Font _Font;
        private Vector2 _Position;
        private string _Message;

    }
}
